package com.yztstudy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 收藏的实体类
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "collect")
public class Collect implements Serializable {

    public static final Long serialVersionUID = 1L;

    //成员变量
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id; // 主键


    @TableField(value = "user_id")
    @JsonProperty("user_id")
    private Integer userId; // 用户主键


    @TableField(value = "product_id")
    @JsonProperty("product_id")
    private Integer productId; // 商品主键


    @JsonProperty("collect_time")
    @TableField(value = "collect_time")
    private Long collectTime; // 收藏对应的时间戳
}
